//
//  IGMainSearchApi.m
//  jingdongfang
//
//  Created by BOE on 2017/9/20.
//  Copyright © 2017年 LJL. All rights reserved.
//

#import "IGMainSearchApi.h"

@implementation IGMainSearchApi

- (NSString *)requestUrl {
    return @"search/solrSearchV2";
}

- (BOOL)isNeedHub {
    return YES;
}

- (id)requestArgument {
    return @{
             @"uId": [IGUser getUid],
             @"type": [NSString stringWithFormat:@"%@", @(_type)],
             @"name": _searchKey==nil?@"":_searchKey,
             @"pageNumber": [NSString stringWithFormat:@"%@", @(_page)]
             };
}

@end

@implementation IGMainSearchModel

+ (BOOL)propertyIsOptional:(NSString *)propertyName {
    return YES;
}

+ (JSONKeyMapper *)keyMapper
{
    return [[JSONKeyMapper alloc]
            initWithModelToJSONDictionary:@{
                                            @"product":@"lstProduct",
                                            @"user":@"lstUser",
                                            @"special":@"lstSpecial",
                                            @"topics":@"lstTopic"
                                            }];
}

@end

@implementation IGMainSearchResp

@end
